import request from '@/utils/request'



// 获取表格数据
export function getTableData(params) {
    return request({
        url: '/subject/subject',
        method: 'GET',
        params
    })
}

// 删除
export function deleteItem(id) {
    return request({
        url: '/subject/subject/' + id,
        method: 'Delete',
    })
}

// 是否显示
export function editIsShow(id, is_show) {
    return request({
        url: '/subject/subject/' + is_show,
        method: 'PUT',
        data: {
            id, is_show
        }
    })
}

// 添加
export function addItem(data) {
    return request({
        url: '/subject/subject',
        method: 'POST',
        data
    })
}

// 获取单个信息
export function getItemInfo(id) {
    return request({
        url: '/subject/subject/'+id,
        method: 'GET'
    })
}

// 修改
export function editItem(data) {
    return request({
        url: '/subject/subject/'+data.id,
        method: 'PUT',
        data
    })
}

